/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gui;

import java.awt.Dimension;
import java.awt.Toolkit;
import acc.SizeMonition;

/**
 *
 * @author Haitm
 */
public class Index extends javax.swing.JPanel {

    public static int x;
    public static int y;

    /**
     * Creates new form Index
     */
    public Index() {
        Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
        x = this.getHeight();
        y = this.getWidth();
        motion();
        initComponents();


    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        pnlProduct = new javax.swing.JPanel();
        btnProductMaster = new javax.swing.JButton();
        lblProductMaster = new javax.swing.JLabel();
        detail_Product = new javax.swing.JLabel();
        pnlActualBudget = new javax.swing.JPanel();
        btnActualBudget = new javax.swing.JButton();
        lblActualBudget = new javax.swing.JLabel();
        detail_Actual = new javax.swing.JLabel();
        pnlStatistic = new javax.swing.JPanel();
        btnStatistic = new javax.swing.JButton();
        lblStatistics = new javax.swing.JLabel();
        detail_Statistics = new javax.swing.JLabel();
        pnlEstimateBudget = new javax.swing.JPanel();
        btnEstimatedBudget = new javax.swing.JButton();
        lblEstimateBudget = new javax.swing.JLabel();
        detail_Estimated = new javax.swing.JLabel();
        pnlCampaign = new javax.swing.JPanel();
        lblCampaignMaster = new javax.swing.JLabel();
        detail_Campaign_Description = new javax.swing.JLabel();
        btnCampaignMaster = new javax.swing.JButton();
        pnlAdmin = new javax.swing.JPanel();
        btnAdministration = new javax.swing.JButton();
        lblAdmin = new javax.swing.JLabel();
        detail_Admin = new javax.swing.JLabel();
        lblLogo = new javax.swing.JLabel();

        setBackground(new java.awt.Color(255, 255, 255));
        setMinimumSize(new java.awt.Dimension(1020, 700));
        setPreferredSize(new java.awt.Dimension(1020, 700));
        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel1.setBackground(new java.awt.Color(240, 240, 140));
        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/banner.png"))); // NOI18N
        add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, 90));

        pnlProduct.setBackground(new java.awt.Color(255, 255, 255));
        pnlProduct.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                pnlProductMouseClicked(evt);
            }
        });

        btnProductMaster.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/benchmarking.png"))); // NOI18N
        btnProductMaster.setBorder(null);
        btnProductMaster.setContentAreaFilled(false);
        btnProductMaster.setFocusable(false);
        btnProductMaster.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnProductMasterActionPerformed(evt);
            }
        });

        lblProductMaster.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        lblProductMaster.setForeground(new java.awt.Color(3, 97, 145));
        lblProductMaster.setText("Product Master");
        lblProductMaster.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lblProductMasterMouseClicked(evt);
            }
        });

        detail_Product.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
        detail_Product.setText("<html>All new products for which<br>campaigns are to be done."); // NOI18N
        detail_Product.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        detail_Product.setVerticalTextPosition(javax.swing.SwingConstants.TOP);

        javax.swing.GroupLayout pnlProductLayout = new javax.swing.GroupLayout(pnlProduct);
        pnlProduct.setLayout(pnlProductLayout);
        pnlProductLayout.setHorizontalGroup(
            pnlProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlProductLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnProductMaster)
                .addGap(18, 18, 18)
                .addGroup(pnlProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblProductMaster, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(detail_Product, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlProductLayout.setVerticalGroup(
            pnlProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlProductLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlProductLayout.createSequentialGroup()
                        .addComponent(lblProductMaster, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(detail_Product, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(btnProductMaster))
                .addContainerGap())
        );

        add(pnlProduct, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 90, -1, -1));

        pnlActualBudget.setBackground(new java.awt.Color(255, 255, 255));
        pnlActualBudget.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                pnlActualBudgetMouseClicked(evt);
            }
        });

        btnActualBudget.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Icon_ActualBudget.png"))); // NOI18N
        btnActualBudget.setBorder(null);
        btnActualBudget.setContentAreaFilled(false);
        btnActualBudget.setFocusable(false);
        btnActualBudget.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActualBudgetActionPerformed(evt);
            }
        });

        lblActualBudget.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        lblActualBudget.setForeground(new java.awt.Color(3, 97, 145));
        lblActualBudget.setText("Actual Budget");

        detail_Actual.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
        detail_Actual.setText("<html>Actual budget and sales<br>after each campaign finished."); // NOI18N
        detail_Actual.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        detail_Actual.setVerticalTextPosition(javax.swing.SwingConstants.TOP);

        javax.swing.GroupLayout pnlActualBudgetLayout = new javax.swing.GroupLayout(pnlActualBudget);
        pnlActualBudget.setLayout(pnlActualBudgetLayout);
        pnlActualBudgetLayout.setHorizontalGroup(
            pnlActualBudgetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlActualBudgetLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnActualBudget)
                .addGap(18, 18, 18)
                .addGroup(pnlActualBudgetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblActualBudget, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(detail_Actual))
                .addContainerGap())
        );
        pnlActualBudgetLayout.setVerticalGroup(
            pnlActualBudgetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlActualBudgetLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlActualBudgetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlActualBudgetLayout.createSequentialGroup()
                        .addComponent(lblActualBudget, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(detail_Actual, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(btnActualBudget))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        add(pnlActualBudget, new org.netbeans.lib.awtextra.AbsoluteConstraints(680, 280, -1, -1));

        pnlStatistic.setBackground(new java.awt.Color(255, 255, 255));
        pnlStatistic.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                pnlStatisticMouseClicked(evt);
            }
        });

        btnStatistic.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Icon_Statistics.png"))); // NOI18N
        btnStatistic.setBorder(null);
        btnStatistic.setContentAreaFilled(false);
        btnStatistic.setFocusable(false);
        btnStatistic.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnStatisticActionPerformed(evt);
            }
        });

        lblStatistics.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        lblStatistics.setForeground(new java.awt.Color(3, 97, 145));
        lblStatistics.setText("Statistics");

        detail_Statistics.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
        detail_Statistics.setText("<html>Various reports about campaigns,<br>estimated budget and sales,<br>actual budget and sales."); // NOI18N
        detail_Statistics.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        detail_Statistics.setVerticalTextPosition(javax.swing.SwingConstants.TOP);

        javax.swing.GroupLayout pnlStatisticLayout = new javax.swing.GroupLayout(pnlStatistic);
        pnlStatistic.setLayout(pnlStatisticLayout);
        pnlStatisticLayout.setHorizontalGroup(
            pnlStatisticLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlStatisticLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnStatistic, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlStatisticLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblStatistics, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(detail_Statistics, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlStatisticLayout.setVerticalGroup(
            pnlStatisticLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlStatisticLayout.createSequentialGroup()
                .addGap(12, 12, 12)
                .addGroup(pnlStatisticLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnStatistic, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(pnlStatisticLayout.createSequentialGroup()
                        .addComponent(lblStatistics, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(detail_Statistics, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(39, Short.MAX_VALUE))
        );

        add(pnlStatistic, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 420, -1, -1));

        pnlEstimateBudget.setBackground(new java.awt.Color(255, 255, 255));
        pnlEstimateBudget.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                pnlEstimateBudgetMouseClicked(evt);
            }
        });

        btnEstimatedBudget.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Icon_Estiamate.png"))); // NOI18N
        btnEstimatedBudget.setBorder(null);
        btnEstimatedBudget.setContentAreaFilled(false);
        btnEstimatedBudget.setFocusable(false);
        btnEstimatedBudget.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEstimatedBudgetActionPerformed(evt);
            }
        });

        lblEstimateBudget.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        lblEstimateBudget.setForeground(new java.awt.Color(3, 97, 145));
        lblEstimateBudget.setText("Estimate Budget");

        detail_Estimated.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
        detail_Estimated.setText("<html>Estimated budget and sales<br>in each campaign with a given<br>period."); // NOI18N
        detail_Estimated.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        detail_Estimated.setVerticalTextPosition(javax.swing.SwingConstants.TOP);

        javax.swing.GroupLayout pnlEstimateBudgetLayout = new javax.swing.GroupLayout(pnlEstimateBudget);
        pnlEstimateBudget.setLayout(pnlEstimateBudgetLayout);
        pnlEstimateBudgetLayout.setHorizontalGroup(
            pnlEstimateBudgetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEstimateBudgetLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnEstimatedBudget, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEstimateBudgetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(detail_Estimated, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblEstimateBudget, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlEstimateBudgetLayout.setVerticalGroup(
            pnlEstimateBudgetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEstimateBudgetLayout.createSequentialGroup()
                .addGroup(pnlEstimateBudgetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlEstimateBudgetLayout.createSequentialGroup()
                        .addComponent(lblEstimateBudget, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(detail_Estimated, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(btnEstimatedBudget, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        add(pnlEstimateBudget, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 280, -1, -1));

        pnlCampaign.setBackground(new java.awt.Color(255, 255, 255));
        pnlCampaign.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                pnlCampaignMouseClicked(evt);
            }
        });

        lblCampaignMaster.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        lblCampaignMaster.setForeground(new java.awt.Color(3, 97, 145));
        lblCampaignMaster.setText("Campaign Master"); // NOI18N
        lblCampaignMaster.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lblCampaignMasterMouseClicked(evt);
            }
        });

        detail_Campaign_Description.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
        detail_Campaign_Description.setText("<html>Master data for campaigns with<br>each new product and given<br>periods."); // NOI18N
        detail_Campaign_Description.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        detail_Campaign_Description.setVerticalTextPosition(javax.swing.SwingConstants.TOP);

        btnCampaignMaster.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/campaign_master.png"))); // NOI18N
        btnCampaignMaster.setBorder(null);
        btnCampaignMaster.setContentAreaFilled(false);
        btnCampaignMaster.setFocusable(false);
        btnCampaignMaster.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCampaignMasterActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlCampaignLayout = new javax.swing.GroupLayout(pnlCampaign);
        pnlCampaign.setLayout(pnlCampaignLayout);
        pnlCampaignLayout.setHorizontalGroup(
            pnlCampaignLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCampaignLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnCampaignMaster, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlCampaignLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(detail_Campaign_Description, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCampaignMaster, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(42, 42, 42))
        );
        pnlCampaignLayout.setVerticalGroup(
            pnlCampaignLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCampaignLayout.createSequentialGroup()
                .addGroup(pnlCampaignLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlCampaignLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(btnCampaignMaster, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlCampaignLayout.createSequentialGroup()
                        .addGap(47, 47, 47)
                        .addComponent(lblCampaignMaster, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(detail_Campaign_Description, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(33, Short.MAX_VALUE))
        );

        add(pnlCampaign, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 100, -1, -1));

        pnlAdmin.setBackground(new java.awt.Color(255, 255, 255));
        pnlAdmin.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                pnlAdminMouseClicked(evt);
            }
        });

        btnAdministration.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/Icon_Admin.png"))); // NOI18N
        btnAdministration.setBorder(null);
        btnAdministration.setContentAreaFilled(false);
        btnAdministration.setFocusable(false);
        btnAdministration.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAdministrationActionPerformed(evt);
            }
        });

        lblAdmin.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        lblAdmin.setForeground(new java.awt.Color(3, 97, 145));
        lblAdmin.setText("Administration");

        detail_Admin.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
        detail_Admin.setText("<html>Add users to groups which<br>are assigned to different<br>modules."); // NOI18N
        detail_Admin.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        detail_Admin.setVerticalTextPosition(javax.swing.SwingConstants.TOP);

        javax.swing.GroupLayout pnlAdminLayout = new javax.swing.GroupLayout(pnlAdmin);
        pnlAdmin.setLayout(pnlAdminLayout);
        pnlAdminLayout.setHorizontalGroup(
            pnlAdminLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAdminLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnAdministration)
                .addGap(18, 18, 18)
                .addGroup(pnlAdminLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblAdmin, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(detail_Admin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlAdminLayout.setVerticalGroup(
            pnlAdminLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAdminLayout.createSequentialGroup()
                .addGap(41, 41, 41)
                .addGroup(pnlAdminLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlAdminLayout.createSequentialGroup()
                        .addComponent(lblAdmin, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(detail_Admin, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(btnAdministration))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        add(pnlAdmin, new org.netbeans.lib.awtextra.AbsoluteConstraints(680, 410, -1, -1));

        lblLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/chos.png"))); // NOI18N
        add(lblLogo, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 240, -1, -1));
    }// </editor-fold>//GEN-END:initComponents

    private void lblCampaignMasterMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lblCampaignMasterMouseClicked
//        if (evt.getButton() == 1) {
//            if (!com.aptech.cis.entities.Permission.CAMPAIGN_MASTER) {
//                new ShowMessageDialog(null, true, "You have noCampaign Master", "Permission Check", ShowMessageDialog.MESSAGE);
//                return;
//            }
//            CampaignInformationManagement.STATUS = CampaignInformationManagement.CAM;
//            CampaignInformationManagement.callJPanel(new CampaignMaster());
//        }
    }//GEN-LAST:event_lblCampaignMasterMouseClicked

    private void btnCampaignMasterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCampaignMasterActionPerformed
//        if (!com.aptech.cis.entities.Permission.CAMPAIGN_MASTER) {
//            new ShowMessageDialog(null, true, "You have no Campaign Master", "Permission Check", ShowMessageDialog.MESSAGE);
//            return;
//        }
//        CampaignInformationManagement.STATUS = CampaignInformationManagement.CAM;
//        CampaignInformationManagement.callJPanel(new CampaignMaster());
    }//GEN-LAST:event_btnCampaignMasterActionPerformed

    private void pnlCampaignMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pnlCampaignMouseClicked
//        if (!com.aptech.cis.entities.Permission.CAMPAIGN_MASTER) {
//            new ShowMessageDialog(null, true, "You have no Campaign Master", "Permission Check", ShowMessageDialog.MESSAGE);
//            return;
//        }
//        CampaignInformationManagement.STATUS = CampaignInformationManagement.CAM;
//        CampaignInformationManagement.callJPanel(new CampaignMaster());
    }//GEN-LAST:event_pnlCampaignMouseClicked

    private void btnProductMasterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnProductMasterActionPerformed
//        if (!com.aptech.cis.entities.Permission.PRODUCT_MASTER && !com.aptech.cis.entities.Permission.CAMPAIGN_MASTER) {
//            new ShowMessageDialog(null, true, "You have no Product Master", "Permission Check", ShowMessageDialog.MESSAGE);
//            return;
//        }
//        CampaignInformationManagement.STATUS = CampaignInformationManagement.PRO;
//        CampaignInformationManagement.callJPanel(new ProductMaster());
    }//GEN-LAST:event_btnProductMasterActionPerformed

    private void lblProductMasterMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lblProductMasterMouseClicked
//        if (evt.getButton() == 1) {
//            if (!com.aptech.cis.entities.Permission.PRODUCT_MASTER && !com.aptech.cis.entities.Permission.CAMPAIGN_MASTER) {
//                new ShowMessageDialog(null, true, "You have no Product Master", "Permission Check", ShowMessageDialog.MESSAGE);
//                return;
//            }
//            CampaignInformationManagement.STATUS = CampaignInformationManagement.PRO;
//            CampaignInformationManagement.callJPanel(new ProductMaster());
//        }
    }//GEN-LAST:event_lblProductMasterMouseClicked

    private void pnlProductMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pnlProductMouseClicked
//        if (!com.aptech.cis.entities.Permission.PRODUCT_MASTER && !com.aptech.cis.entities.Permission.CAMPAIGN_MASTER) {
//            new ShowMessageDialog(null, true, "You have no Product Master", "Permission Check", ShowMessageDialog.MESSAGE);
//            return;
//        }
//        CampaignInformationManagement.STATUS = CampaignInformationManagement.PRO;
//        CampaignInformationManagement.callJPanel(new ProductMaster());
    }//GEN-LAST:event_pnlProductMouseClicked

    private void btnActualBudgetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActualBudgetActionPerformed
//        if (!com.aptech.cis.entities.Permission.ACTUAL_BUDGET) {
//            new ShowMessageDialog(null, true, "You have no Actual Budget Master", "Permission Check", ShowMessageDialog.MESSAGE);
//            return;
//        }
//        CampaignInformationManagement.STATUS = CampaignInformationManagement.ACT;
//        CampaignInformationManagement.callJPanel(new ActualBudget());
    }//GEN-LAST:event_btnActualBudgetActionPerformed

    private void pnlActualBudgetMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pnlActualBudgetMouseClicked
//        if (!com.aptech.cis.entities.Permission.ACTUAL_BUDGET) {
//            new ShowMessageDialog(null, true, "You have no Actual Budget Master", "Permission Check", ShowMessageDialog.MESSAGE);
//            return;
//        }
//        CampaignInformationManagement.STATUS = CampaignInformationManagement.ACT;
//        CampaignInformationManagement.callJPanel(new ActualBudget());
    }//GEN-LAST:event_pnlActualBudgetMouseClicked

    private void btnStatisticActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStatisticActionPerformed
//        CampaignInformationManagement.STATUS = CampaignInformationManagement.STA;
//        CampaignInformationManagement.callJPanel(new Statistics());
    }//GEN-LAST:event_btnStatisticActionPerformed

    private void pnlStatisticMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pnlStatisticMouseClicked
//        CampaignInformationManagement.STATUS = CampaignInformationManagement.STA;
//        CampaignInformationManagement.callJPanel(new Statistics());
    }//GEN-LAST:event_pnlStatisticMouseClicked

    private void btnEstimatedBudgetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEstimatedBudgetActionPerformed
//        if (!com.aptech.cis.entities.Permission.ESTIMATED_BUDGET) {
//            new ShowMessageDialog(null, true, "You have no Estimated Budget Master", "Permission Check", ShowMessageDialog.MESSAGE);
//            return;
//        }
//        CampaignInformationManagement.STATUS = CampaignInformationManagement.EST;
//        CampaignInformationManagement.callJPanel(new EstimatedBudget());
    }//GEN-LAST:event_btnEstimatedBudgetActionPerformed

    private void pnlEstimateBudgetMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pnlEstimateBudgetMouseClicked
//        if (!com.aptech.cis.entities.Permission.ESTIMATED_BUDGET) {
//            new ShowMessageDialog(null, true, "You have no Estimated Budget Master", "Permission Check", ShowMessageDialog.MESSAGE);
//            return;
//        }
//        CampaignInformationManagement.STATUS = CampaignInformationManagement.EST;
//        CampaignInformationManagement.callJPanel(new EstimatedBudget());
    }//GEN-LAST:event_pnlEstimateBudgetMouseClicked

    private void btnAdministrationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAdministrationActionPerformed
//        if (!com.aptech.cis.entities.Permission.ADMINISTRATOR) {
//            new ShowMessageDialog(null, true, "You have no Administrator", "Permission Check", ShowMessageDialog.MESSAGE);
//            return;
//        }
//        CampaignInformationManagement.STATUS = CampaignInformationManagement.ADM;
//        CampaignInformationManagement.callJPanel(new Administration());
        if (entity.Permission.ADMINISTRATOR == true) {
            Main.callJPanel(new Administrator());
        } else {
            new ShowMessageDialog(null, true, "You no have permission access ", ShowMessageDialog.MESSAGE);
        }
    }//GEN-LAST:event_btnAdministrationActionPerformed

    private void pnlAdminMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pnlAdminMouseClicked
//        if (!com.aptech.cis.entities.Permission.ADMINISTRATOR) {
//            new ShowMessageDialog(null, true, "You have no Administrator", "Permission Check", ShowMessageDialog.MESSAGE);
//            return;
//        }
//        CampaignInformationManagement.STATUS = CampaignInformationManagement.ADM;
//        CampaignInformationManagement.callJPanel(new Administration());
        if (entity.Permission.ADMINISTRATOR == true) {
            Main.callJPanel(new Administrator());
        } else {
            new ShowMessageDialog(null, true, "You no have permission access ", ShowMessageDialog.MESSAGE);
        }
    }//GEN-LAST:event_pnlAdminMouseClicked
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnActualBudget;
    private javax.swing.JButton btnAdministration;
    private javax.swing.JButton btnCampaignMaster;
    private javax.swing.JButton btnEstimatedBudget;
    private javax.swing.JButton btnProductMaster;
    private javax.swing.JButton btnStatistic;
    private javax.swing.JLabel detail_Actual;
    private javax.swing.JLabel detail_Admin;
    private javax.swing.JLabel detail_Campaign_Description;
    private javax.swing.JLabel detail_Estimated;
    private javax.swing.JLabel detail_Product;
    private javax.swing.JLabel detail_Statistics;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel lblActualBudget;
    private javax.swing.JLabel lblAdmin;
    private javax.swing.JLabel lblCampaignMaster;
    private javax.swing.JLabel lblEstimateBudget;
    private javax.swing.JLabel lblLogo;
    private javax.swing.JLabel lblProductMaster;
    private javax.swing.JLabel lblStatistics;
    private javax.swing.JPanel pnlActualBudget;
    private javax.swing.JPanel pnlAdmin;
    private javax.swing.JPanel pnlCampaign;
    private javax.swing.JPanel pnlEstimateBudget;
    private javax.swing.JPanel pnlProduct;
    private javax.swing.JPanel pnlStatistic;
    // End of variables declaration//GEN-END:variables

    private void motion() {
        this.setSize(0, 0);
        new Thread(new SizeMonition(this, x, y)).start();
    }
}
